package com.ywl.designpattern.state;

public class StatePatteryDemo {
    public static void main(String[] args) {
        VendingMachine vendingMachine = new VendingMachine(2);

        vendingMachine.insertCoin();
        vendingMachine.selectItem();

        vendingMachine.insertCoin();
        vendingMachine.ejectCoin();
        vendingMachine.selectItem();

        vendingMachine.insertCoin();
        vendingMachine.selectItem();

        vendingMachine.insertCoin();
        vendingMachine.selectItem();
    }
}
